﻿using System.Collections.Generic;
using DimOS.Internals;
using DateTime = DimOS.Plugs.DateTime;

namespace DimOS.DimSH
{
    public class JournalEntry
    {
        public DateTime Timestamp { get; set; }         //Date and time when the command was submitted 

        public List<CharColor> Command { get; set; }    //Command string (includes syntax highlighting)

        public string Commentary { get; set; }          //Possible comment/remark/advice from AI Tutor

        public JournalEntry Parent { get; set; }        //Reference to the parent entry for here-input

        public JournalEntry(List<CharColor> command, string commentary = "", JournalEntry parent = null)
        {
            Timestamp = DateTime.Now;
            Command = command;
            Commentary = commentary;
            Parent = parent;
        }

        public JournalEntry(DateTime timestamp, List<CharColor> command,
            string commentary = "", JournalEntry parent = null)
        {
            Timestamp = timestamp;
            Command = command;
            Commentary = commentary;
            Parent = parent;
        }

        public JournalEntry()
        { Timestamp = null; Command = null; Commentary = ""; Parent = null; }
    }
}
